﻿using System;
using System.Collections.Generic;
using System.Data.SQLite;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CS.Model;

namespace CS.DAL
{
   public  class LoginDal
    {
        public bool isExist(LoginModel loginmodel)
        {
            string sqlstr = "select * from loginTbl where (loginuid=@loginuid and loginpwd=@loginpwd)";
            SQLiteParameter[] ps=new SQLiteParameter[]
            {
                new SQLiteParameter("@loginuid",loginmodel.LoginModelName),
                new SQLiteParameter("@loginpwd",loginmodel.LoginModePwd), 
            };
            object count = SqLiteHelper.ExecuteScalar(sqlstr, ps);
            return count !=null;

        }
    }
}
